<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Button test</title>
<link rel="stylesheet" type="text/css" href="popbox.css" />

<script type="text/javascript" src="../../os3jslib/liwe.js"></script>
<script type="text/javascript" src="../../os3jslib/dom.js"></script>
<script type="text/javascript" src="../../os3jslib/utils.js"></script>
<script type="text/javascript" src="../wwl.js"></script>
<script type="text/javascript" src="popbox.js"></script>

<script type="text/javascript">
function init ()
{
	// WWL.include ( 'button' );
	
	// liwe.utils.wait_def ( 'WWL.button', do_all );

	do_all ();
}

function do_all ()
{
	var pop = new WWL.popbox ( 'prova' );

	pop.set_parent ( $( "p1" ), "D" );
	pop.set_delta ( 0, 0 );
	pop.show ();
}

var _is_disabled = false;

function set_disabled ()
{
	var b = WWL.button.get_instance ( 'prova' );

	_is_disabled = ! _is_disabled;

	b.disable ( _is_disabled );
};

function hide_show ()
{
	var pop = WWL.popbox.get_instance ( "prova" );

	if ( pop.is_hidden () )
		pop.show ();
	else
		pop.hide ();
}


</script>
</head>
<body onload="init()">

	<table border="1" width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td width="120">ciao</td>
		<td width="300">pizza</td>
		<td width="100">pazza</td>
	</tr>
	<tr>
		<td width="120">ciao</td>
		<td width="300">pizza</td>
		<td width="100">pazza</td>
	</tr>
	<tr>
		<td width="120">ciao</td>
		<td width="300">pizza</td>
		<td width="100">pazza</td>
	</tr>
	<tr>
		<td width="120">ciao</td>
		<td width="300">pizza</td>
		<td width="100">pazza</td>
	</tr>
	<tr>
		<td width="120">ciao</td>
		<td width="300"><div id="p1">REF</div></td>
		<td width="100">pazza</td>
	</tr>
	<tr>
		<td width="120">ciao</td>
		<td width="300">pizza</td>
		<td width="100">pazza</td>
	</tr>
	<tr>
		<td width="120">ciao</td>
		<td width="300">pizza</td>
		<td width="100">pazza</td>
	</tr>
	<tr>
		<td width="120">ciao</td>
		<td width="300">pizza</td>
		<td width="100"><button onclick="hide_show()">Hide / Show</button></td>
	</tr>
	</table>


</body>
</html>
